<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
    <link rel="stylesheet" href="../static/css/mycss.css">
    <title>归档</title>
</head>
<body>
<!--导航-->
<nav th:replace="_fragments :: menu(4)" class="ui inverted attached segment my-padding-small my-shadow-small"><!--attached会连接上一个模块，没有缝隙-->
    <div class="iu container">
        <div class="ui inverted secondary stackable menu"> <!--menu导航条;   stackable会让导航栏以堆积的方式适应屏幕-->
            <h2 class="ui teal header item">Blog</h2>  <!--item让这部分成为导航栏的条目-->
            <a href="" class="my-item item my-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="" class="my-item item my-mobile-hide"><i class="idea icon"></i>分类</a>
            <a href="" class="my-item item my-mobile-hide"><i class="tags icon"></i>标签</a>
            <a href="" class="active my-item item my-mobile-hide"><i class="clone icon"></i>归档</a>
            <a href="" class="my-item item my-mobile-hide"><i class="info icon"></i>关于我</a>
            <div class="right my-item item my-mobile-hide">
                <div class="ui icon inverted transparent input">
                    <input type="text" placeholder="Search...">
                    <i class="search link icon"></i>
                </div>
            </div>
        </div>
    </div>
    <div href="" class="ui my-menu toggle black icon button my-right-top my-mobile-show">
        <i class="sidebar icon"></i><!--三条横杠图标-->
    </div>
</nav>

<!--中间-->
<div class="my-container-small my-padding-large">
    <div class="container"><!--用container能让网页在手机、电脑等设备上面以最好的方式显示-->
        <!--header-->
        <div class="ui top attached my-padding-big segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h3 class="ui teal header">归档</h3>
                </div>
                <div class="right aligned column">
                    共 <h2 class="ui orange header my-inline-block my-text-thin" th:text="${blogCount}">114</h2>个
                </div>
            </div>
        </div>

        <th:block th:each="item : ${archiveMap}">
        <h2 class="ui center aligned header" th:text="${item.key}">2021</h2>
        <div class="ui fluid vertical menu">
            <a href="" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}" class="item" th:each="blog : ${item.value}">
                <span>
                    <i class="teal circle icon"></i>
                    <span th:text="${blog.title}">抽奖改命手册</span>
                  <div class="ui teal basic left pointing label my-padding-mini my-text-thin" th:text="${#dates.format(blog.updateTime,'MM.dd')}">4月25</div>
                 </span>
                 <div class="ui orange basic label" th:text="${blog.flag}">原创</div>

            </a>

        </div>
        </th:block>
    </div>
</div>

<!--底部-->
<footer th:replace="_fragments :: footer"  class="ui inverted vertical segment my-padding-massive">
    <div class="ui container diy_dp">
        <div class="ui stackable center aligned inverted divided grid">
            <div class="three wide column">
                <img src="../static/image/微信.jpg" class="ui rounded image centered aligned" alt="" style="width: 130px">
            </div>

            <div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <div class="ui inverted link list"></div>
                <a href="" class="item">碧蓝航线攻略</a><br>
                <a href="" class="item">游戏抽奖技巧</a><br>
                <a href="" class="item">如何与傻逼交流</a>
            </div>

            <div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <div class="ui inverted link list"></div>
                <a href="" class="item">碧蓝航线攻略</a><br>
                <a href="" class="item">游戏抽奖技巧</a><br>
                <a href="" class="item">如何与傻逼交流</a>
            </div>

            <div class="seven wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <p class="my-text-spaced my-text-thin my-opacity-mini">这是我的个人博客，赶紧进去看看，你们不要不知好歹</p>
            </div>

        </div>
        <div class="ui inverted section divider"></div>
        <p class="my-text-spaced my-text-thin my-opacity-tiny">Copyright @ 2021-2022 MrWuu Designed by MrWuu</p>
    </div>

</footer>


<!--/*/<th:block th:replace="_fragments :: script">/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js"></script>
<!--/*/</th:block>/*/-->
<script>
    $('.my-menu.toggle').click(function () {
        $('.my-item').toggleClass('my-mobile-hide');
        /*toggleClass效果：点击之后如果有my-mobile-hide这一个样式就去除掉
        如果没有则加上去*/
        /*这个js原理是先获取.my-menu toggle的作用域再把后面点击之后的效果加上来
            点击效果是由获取.my-item的作用域,加上toggleClass给的功能组成的*/
    });


</script>

</body>
</html>